<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>   
<%
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>接收请求参数</title>
</head>
<body bgcolor="#ffffff">
<h1>
接收客户端请求数据
</h1>
<%
request.setCharacterEncoding("UTF-8");
String name=request.getParameter("name");
String sex=request.getParameter("sex");
String[] interest=request.getParameterValues("interest");
%>
<table border="1">
 <tr>
  <td>用户名:</td>
  <td><%=name %></td>
 </tr>
 <tr>
  <td>性别:</td>
  <td><%=sex %></td>
 </tr>
 <tr>
   <td>兴趣爱好:</td>
   <td>
   <%
   for (int i =0;i < interest.length;i++){
    out.print(interest[i]);
    out.print(",");
    }
    %>
   </td>
</tr>
</table>
</body>
</html>